home *** CD-ROM | disk | FTP | other *** search
/ Aminet 30 / Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso / Aminet / comm / mail / Hurl.lha / Hurl! / Install < prev    next >
Text File  |  1999-02-07  |  5KB  |  182 lines

  1. ; A General Installation Script
  2. ; Copyright © 1998 by Ralph Torchia
  3. ; $VER:GenInstallScript v1.1 (09.16.1998)
  4. ; $DESCRIPTION: Customized for Hurl v2 - Install v1.6 (07.02.1999)
  5.  
  6. (set @PRGVersion "1.4")
  7.  
  8. ;-------------- Get Current Hurl version  ---------------
  9. (set vernum_new (getversion "hurl"))
  10. (set ver_new (/ vernum_new 65536))
  11. (set rev_new (- vernum_new (* ver_new 65536) ) )
  12.  
  13. ;-------------- Introduce Ourselves ------------------
  14. (welcome
  15.   ("\nWelcome!\n\n")
  16.   ("    This script will copy the program Hurl\nto your system.\n")
  17.   ("    Please follow the intaller's instruction to install\n\n")
  18. )
  19.  
  20. ;-------------- Are we installing for YAM only? ---------------
  21. (set #yamchoice
  22.   (askchoice
  23.     (prompt "Do you want to install Hurl only for YAM?")
  24.     (help @askchoice-help)
  25.     (choices "Yes"
  26.              "No")
  27.     (default 0)
  28.   )
  29. )
  30.  
  31. ;-------------- Choice #1 = Install to YAM: directory ---------------
  32. (if (= #yamchoice 0)
  33.  (
  34.   (set #homedir "YAM:")
  35.  
  36.   (if (not (exists #homedir (noreq)))
  37.     (
  38.       (set #homedir
  39.         (askdir
  40.           (prompt "Where is the program YAM located?")
  41.           (help " Please locate the YAM directory. (The main program YAM is located within it).")
  42.           (default #homedir)
  43.         )
  44.       )
  45.     )
  46.   )
  47.  
  48.   (set @default-dest (tackon #homedir "Rexx/"))
  49.   (set @hurlfile-dest (tackon @default-dest "Hurl"))
  50.  
  51.   (if (not (exists @default-dest (noreq)))
  52.     (
  53.       (makedir @default-dest
  54.         (prompt "Directory "@default-dest" does not exist!\nCreate it now?")
  55.         (help "YAM places all its scripts within the Rexx folder.  Proceeding with this installation will result in the YAM:Rexx folder being created.")
  56.         (confirm 0)
  57.       )
  58.     )
  59.   )
  60.  
  61.   (set vernum_old (getversion @hurlfile-dest))
  62.   (set ver_old (/ vernum_old 65536))
  63.   (set rev_old (- vernum_old (* ver_old 65536) ) )
  64.   (message
  65.     ("You are about to install Hurl version %ld.%ld.\n" ver_new rev_new)
  66.     ("You currently have version %ld.%ld installed" ver_old rev_old)
  67.    )
  68.  
  69.   (if (exists @default-dest (noreq))
  70.       (
  71.         (copyfiles
  72.           (prompt "Copying Hurl to " @default-dest)
  73.           (help @copyfiles-help)
  74.           (source "Hurl")
  75.           (dest @default-dest)
  76.           (files)
  77.         )
  78.       )
  79.   )
  80.  
  81.   (if (exists @hurlfile-dest (noreq))
  82.    (
  83.     (set #mode
  84.       (askchoice
  85.         (prompt "Do you want to configure YAM for Hurl?")
  86.         (help @askchoice-help)
  87.         (choices "Yes - Configure YAM for Hurl usage"
  88.                  "Yes - Configure YAM and set Hurl to auto mode"
  89.                  "No  - I'll do it myself!")
  90.         (default 0)
  91.       )
  92.     )
  93.  
  94.     (if (= #mode 0)
  95.       ((rexx "configyam4hurl.rexx"))
  96.     )
  97.  
  98.     (if (= #mode 1)
  99.       ((rexx "configyam4hurl.rexx auto"))
  100.     )
  101.    )
  102.   )
  103.  
  104.   (if (not (exists @hurlfile-dest (noreq)))
  105.     ((abort "You did not locate the YAM directory and program correctly!\nPlease try again...\n"))
  106.   )
  107.  )
  108. )
  109.  
  110. ;-------------- Choice #2 = Install to User's system instead ---------------
  111. (if (= #yamchoice 1)
  112.  (
  113.   (set #homedir "c:")
  114.   (set #homedir
  115.     (askdir
  116.       (prompt "Where do you want to install Hurl to?")
  117.       (help "Please choose a dirctory to install Hurl to.  C: is a good choice.")
  118.       (default #homedir)
  119.     )
  120.   )
  121.  
  122.   (set vernum_old (getversion (tackon #homedir "Hurl")))
  123.   (set ver_old (/ vernum_old 65536))
  124.   (set rev_old (- vernum_old (* ver_old 65536) ) )
  125.   (message
  126.     ("You are about to install Hurl version %ld.%ld.\n" ver_new rev_new)
  127.     ("You currently have version %ld.%ld installed" ver_old rev_old)
  128.    )
  129.  
  130.   (if (exists #homedir (noreq))
  131.     (
  132.       (set @default-dest #homedir)
  133.       (copyfiles
  134.         (prompt "Copying Hurl to " @default-dest)
  135.         (help @copyfiles-help)
  136.         (source "Hurl")
  137.         (dest @default-dest)
  138.         (files)
  139.       )
  140.     )
  141.   )
  142.  )
  143. )
  144.  
  145. ;-------------- Install Hurl.guide? ---------------
  146. (set #guidechoice
  147.   (askchoice
  148.     (prompt "Do you want to install the Hurl Guide file?")
  149.     (help @askchoice-help)
  150.     (choices "Yes"
  151.              "No")
  152.     (default 0)
  153.   )
  154. )
  155.  
  156. (if (= #guidechoice 0)
  157.   (
  158.     (set #guidedir "Help:")
  159.     (set #guidedir
  160.       (askdir
  161.         (prompt "Where do you want to install Hurl.guide to?")
  162.         (help "Please choose a dirctory to install Hurl.guide to.  Help: is a good choice.")
  163.         (default #guidedir)
  164.       )
  165.     )
  166.    (if (exists #guidedir (noreq))
  167.      (
  168.        (copyfiles
  169.          (prompt "Copying Hurl.guide to " #guidedir)
  170.          (help @copyfiles-help)
  171.          (source "Hurl.guide")
  172.          (dest #guidedir)
  173.          (files)
  174.        )
  175.      )
  176.    )
  177.   )
  178. )
  179.  
  180. (exit "Done installing Hurl.\n\nRemember, this is Emailware!")
  181.  
  182.